﻿using log4net;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WMSSyncData.Core;
using WMSSyncData.Utils;

namespace SyncHoldData
{
    public class SyncJob : IJob
    {
        private readonly ILog _logger = LogManager.GetLogger(typeof(SyncJob));
        public void Execute(IJobExecutionContext context)
        {

            new Thread(() =>
            {
                try
                {
                    _logger.Info("1.上海抓取HOLD箱号开始***S");
                    MyBll bll = new MyBll();
                    int ret = bll.GetSHHoldBoxes();
                    _logger.Info("处理：" + ret + "条");
                    _logger.Info("1.上海抓取HOLD箱号结束***E");
                }
                catch (Exception)
                {
                }
            }).Start();

            new Thread(() =>
            {
                try
                {
                    _logger.Info("2.海盐抓取HOLD箱号开始***S");
                    MyBll bll = new MyBll();
                    int ret = bll.GetHYHoldBoxes();
                    _logger.Info("处理：" + ret + "条");
                    _logger.Info("2.海盐抓取HOLD箱号结束***E");
                }
                catch (Exception)
                {
                }
            }).Start();

           
        }

    }
}
